﻿
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using PPIProxy.PPIWebservice;

namespace PPIProxy
{
	public static class WUtility_QueryAsset
	{
		#region Query
        public static DataSet SelectCRUD(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectCRUD(utility_QueryAssetId, connectionKey);

        }
        public static DataSet ExecuteQuery_XMission(Int32 queryAssetFK, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_ExecuteQuery_XMission(queryAssetFK, connectionKey);
        }
        public static DataSet SellectAll_ContactQueries(Int32 contactFK, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SellectAll_ContactQueries(contactFK, connectionKey);
        }
        public static DataSet SelectAll(string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.SelectAll(connectionKey);
        }

        #region Cross Tables
        public static DataSet SelectYears(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectYears(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectTopTypes(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectTopTypes(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectPoleTopTypes(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectPoleTopTypes(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectPoleSpecies(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectPoleSpecies(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectProjects(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectProjects(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectPoleTreatments(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectPoleTreatments(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectPoleClasses(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectPoleClasses(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectVendors(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectVendors(utility_QueryAssetId, connectionKey);
        }
        public static DataSet SelectAssets(Int32 utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return serv.Utility_Query_Asset_SelectAssets(utility_QueryAssetId, connectionKey);
        }
        #endregion Cross Tables
        #endregion Query

        #region CRUD
        #region summary
        /// <summary>
        /// Date: 05/26/2008
        /// Time: 14:01:07
        /// Generated by: VMCoder
        /// Generated using VirtualGenerator
        /// </summary>
        #endregion summary
        public static Int32 Insert(Int32 utilityFK, Int32 utility_Query_TypeFK, Int32 utility_ContactFK, string name, string color, Int32 textToShow, bool showLineParents, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            return
                serv.Utility_Query_Asset_Insert(utilityFK, utility_Query_TypeFK, utility_ContactFK, name, color,
                                                textToShow, showLineParents,connectionKey);
        }
        #region summary
        /// <summary>
        /// Date: 05/26/2008
        /// Time: 14:01:07
        /// Generated by: VMCoder
        /// Generated using VirtualGenerator
        /// </summary>
        #endregion summary
        public static void Update(Int32 utility_QueryAssetId, Int32 utilityFK, Int32 utility_Query_TypeFK, Int32 utility_ContactFK, string name, string color, Int32 textToShow, bool showLineParents, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            serv.Utility_Query_Asset_Update(utility_QueryAssetId, utilityFK, utility_Query_TypeFK, utility_ContactFK,
                                            name, color, textToShow, showLineParents, connectionKey);

        }
        public static void Delete(Int32 Utility_QueryAssetId, string connectionKey)
        {
            PPIProxy.PPIWebservice.PPIWebServiceClass serv = new PPIService();
            serv.Utility_Query_Asset_Delete(Utility_QueryAssetId, connectionKey);
        }
        #endregion CRUD
    }
}
